package com.example.service.impl2;

import com.example.entity.TianLuo;
import com.example.mapper.TianLuoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TianluoServiceInOutService {
   
    @Autowired
    private TianluoFlowService tianluoFlowService;
    @Autowired
    private TianLuoMapper tianLuoMapper;
    
    

    @Transactional
    public void doSomething(String data) {
        TianLuo tianLuo = new TianLuo();
        tianLuo.setName(data+"tianLuoMapper");
        tianLuoMapper.insert(tianLuo);
        tianluoFlowService.saveFlow(data+"tianluoFlowService");
        // int i = 1 / 0;
    }

}
